require('@jassets/css/main.css')

const init = {
	// 初始化菜单栏
	west: require('./main-tree'),
	center: require('./main-tabs'),
}

module.exports = function() {
	let {
		mainComp,
	} = $['components-jq']
	let layoutJQ = mainComp.layoutJQ = $("#main-layout")
	layoutJQ.layout({
		fit: true,
		onAdd(region) {
			if (typeof init[region] == 'function')
				init[region]()
		}
	}).layout('add', {
		region: 'west',
		width: 180,
		title: 'West Title',
		split: true,
		content: '<div id="main-tree"></div>',
	}).layout('add', {
		region: 'center',
		title: 'Center Title',
		content: '<div id="main-tabs"></div>',
	}).layout('resize')

	// .layout('add', {
	// 	region: 'north',
	// 	height: 70,
	// 	title: 'North Title',
	// 	border: false,
	// })
}